package system

import (
	"MoSkeleton/models/system"
	"gorm.io/gorm"
)

type SysRoleDeptService struct {
}

func (r *SysRoleDeptService) DeleteRoleDeptByRoleId(tx *gorm.DB, roleId uint64) (bool, error) {
	return (&system.SysRoleDept{}).DeleteByRoleIds(tx, &[]uint64{roleId})
}

func (r *SysRoleDeptService) AddRoleDepts(tx *gorm.DB, roleId uint64, deptIds []uint64) (bool, error) {
	return (&system.SysRoleDept{}).AddRoleDepts(tx, roleId, deptIds)
}
